package com.weme.mine.viewmode

import com.osom.proto.message.NetworkOuterClass
import com.weme.common.base.BaseViewModel
import com.weme.common.manager.SocketManager
import com.weme.common.network.NetWorkUrl
import dev.kratos.api.user_server.v1.LogoutRequest

class SettingsViewMode :BaseViewModel(){
    fun outLoginApi(req: NetworkOuterClass.LoginRequest) {


        try {
            SocketManager.send(req, NetworkOuterClass.NetworkCommand.CMD_GATEWAY_LOGINOUT_REQUEST.number,0)
        } catch (e: Exception) {
            //log.error(e)
        }
    }
    fun outLogin(req: LogoutRequest) {
        val reqByte = req.toByteArray()
        sendNetworkRequest(reqByte,NetWorkUrl.Logout)
    }
}